package com.tutu.mybatis.dynamic.datasource.controller;

import com.tutu.mybatis.dynamic.datasource.annotation.ApiLog;
import com.tutu.mybatis.dynamic.datasource.annotation.IgnoreApiLog;
import com.tutu.mybatis.dynamic.datasource.bean.User;
import com.tutu.mybatis.dynamic.datasource.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author qyy
 * @date 2021/3/19 17:41
 */
@RestController
@ApiLog
public class TestController {

    @Resource
    UserService userService;

    @GetMapping("user/list")
    List<User> list() {
        return userService.list();
    }

    @IgnoreApiLog
    @GetMapping("user/test")
    void test() {

    }

    @GetMapping("user/string")
    String string() {
        return "string";
    }
}
